﻿<UserControl x:Class="Vtron.LEDCorrective.Pages.ExpectedBrightColor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI">
    <UserControl.Resources>
        <Style x:Key="TextBlockStyle" TargetType="TextBlock">
            <Setter Property="HorizontalAlignment" Value="Right"/>
            <Setter Property="Margin" Value="0,0,5,0"/>
            <Setter Property="FontSize" Value="13.333"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
        <Style x:Key="TextBoxStyle" TargetType="TextBox">
            <Setter Property="Width" Value="350"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Margin" Value="5,3,0,3"/>
            <Setter Property="BorderThickness" Value="0,0,0,1"/>
            <Setter Property="BorderBrush" Value="Black"/>
            <Setter Property="Background" Value="{x:Null}"/>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Text="期望亮色度" Margin="20,20,40,8" FontSize="18"/>
        <Line Grid.Row="1" Height="1" Stretch="Fill" X2="1" Stroke="#cccccc" StrokeDashArray="1, 1"  StrokeThickness="2" Margin="20,0,20,5" />

        <Grid Grid.Row="2" Margin="20,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="校正模式:" Style="{StaticResource TextBlockStyle}"/>
                <StackPanel Grid.Column="1" Grid.ColumnSpan="4" Orientation="Horizontal" Margin="5,20" HorizontalAlignment="Left">
                    <RadioButton x:Name="light_rb" GroupName="Mode" Margin="0,0,0,0" VerticalAlignment="Center" IsChecked="True" Checked="light_rb_Checked">亮度校正</RadioButton>
                    <RadioButton x:Name="color_rb" GroupName="Mode" Margin="20,0,0,0" VerticalAlignment="Center" Checked="color_rb_Checked">亮度色度校正</RadioButton>
                </StackPanel>
            </Grid>
            <Grid Grid.Row="1" x:Name="chroma_Grid" Visibility="Collapsed">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="亮色度参数:" Style="{StaticResource TextBlockStyle}" Margin="5,0,5,20"/>
                    <StackPanel Grid.Column="1" Grid.ColumnSpan="4" Orientation="Horizontal" Margin="5,0,5,20" HorizontalAlignment="Left">
                        <RadioButton x:Name="measure_rb" GroupName="Mode1" Margin="0,0,0,0" VerticalAlignment="Center" IsChecked="True" Checked="measure_rb_Checked">测量</RadioButton>
                        <RadioButton x:Name="sRGB_rb" GroupName="Mode1" Margin="20,0,0,0" VerticalAlignment="Center" Checked="sRGB_rb_Checked">sRGB</RadioButton>
                        <RadioButton x:Name="aRGB_rb" GroupName="Mode1" Margin="20,0,0,0" VerticalAlignment="Center" Checked="aRGB_rb_Checked">aRGB</RadioButton>
                    </StackPanel>
                </Grid>
                <Grid Grid.Row="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="Ced/m²" Style="{StaticResource TextBlockStyle}"/>
                    <TextBlock Grid.Row="0" Grid.Column="1" Text="亮度" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Left" Margin="5,0"/>
                    <TextBlock Grid.Row="0" Grid.Column="2" Text="Cx" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Left" Margin="5,0"/>
                    <TextBlock Grid.Row="0" Grid.Column="3" Text="Cy" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Left" Margin="5,0"/>

                    <TextBlock Grid.Row="1" Grid.Column="0" Text="红" Style="{StaticResource TextBlockStyle}"/>
                    <TextBox x:Name="redBright_txt" Grid.Row="1" Grid.Column="1" Style="{StaticResource TextBoxStyle}"/>
                    <TextBox x:Name="redx_txt" Grid.Row="1" Grid.Column="2" Style="{StaticResource TextBoxStyle}"/>
                    <TextBox x:Name="redy_txt" Grid.Row="1" Grid.Column="3" Style="{StaticResource TextBoxStyle}"/>

                    <TextBlock Grid.Row="2" Grid.Column="0" Text="绿" Style="{StaticResource TextBlockStyle}"/>
                    <TextBox x:Name="greenBright_txt" Grid.Row="2" Grid.Column="1" Style="{StaticResource TextBoxStyle}"/>
                    <TextBox x:Name="greenx_txt" Grid.Row="2" Grid.Column="2" Style="{StaticResource TextBoxStyle}"/>
                    <TextBox x:Name="greeny_txt" Grid.Row="2" Grid.Column="3" Style="{StaticResource TextBoxStyle}"/>

                    <TextBlock Grid.Row="3" Grid.Column="0" Text="蓝" Style="{StaticResource TextBlockStyle}"/>
                    <TextBox x:Name="blueBright_txt" Grid.Row="3" Grid.Column="1" Style="{StaticResource TextBoxStyle}"/>
                    <TextBox x:Name="bluex_txt" Grid.Row="3" Grid.Column="2" Style="{StaticResource TextBoxStyle}"/>
                    <TextBox x:Name="bluey_txt" Grid.Row="3" Grid.Column="3" Style="{StaticResource TextBoxStyle}"/>
                </Grid>
                <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="5,20,5,0" HorizontalAlignment="Right">
                    <Button Content="亮色度窗口" VerticalAlignment="Center" Width="97" Height="26" FontSize="12.333" x:Name="showCIE_Btn" Click="showCIE_Btn_Click"/>
                </StackPanel>
            </Grid>
            <Grid Grid.Row="2">
                <StackPanel Orientation="Horizontal" Margin="5,20,5,0" HorizontalAlignment="Right">
                    <Button Content="确定" VerticalAlignment="Center" Width="97" Height="26" FontSize="12.333" x:Name="submit_Btn" Click="submit_Btn_Click"/>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
